package com.liao.badminton.vo;

import com.liao.badminton.code.BaseField;
import io.swagger.annotations.ApiModelProperty;
import java.lang.String;
import java.util.Date;
import java.util.List;
import lombok.Data;
import com.liao.badminton.entity.SystemLoginLog;
/**
* @author liaocheng
* @date 2024-12-23
* description:用户登录日志
*/
@Data
public class SystemLoginLogVo  extends BaseField {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "登录IP")
    private String loginIp;

    @ApiModelProperty(value = "登录类型1一键登录2密码登录3微信4微博5QQ6缓存登录")
    private Integer loginType;

    @ApiModelProperty(value = "登录设备1web,2android,3ios,4h5,5其他")
    private String loginSource;

    private List<Long> delIds;  //批量删除ids

    public static SystemLoginLogVo invertToVo(SystemLoginLog systemLoginLog){
        SystemLoginLogVo vo = new SystemLoginLogVo();
        BaseField.invert(systemLoginLog, vo);
        vo.setId(systemLoginLog.getId());
        vo.setUserId(systemLoginLog.getUserId());
        vo.setLoginIp(systemLoginLog.getLoginIp());
        vo.setLoginType(systemLoginLog.getLoginType());
        vo.setLoginSource(systemLoginLog.getLoginSource());
        return vo;
    }
}
